<template>
  <view :style="themeColor">
    <view class="page">
      <fu-custom bgColor="bg-white" :isBack="true" :isBottom="true">
        <block slot="content">会员</block>
      </fu-custom>
      <!---flex布局flex布局开始-->
      <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout">
        <view class='flex flex-direction flex-wrap align-stretch huiyuan_fd1_0'>
          <view class='flex flex-wrap align-center'>
            <view class='flex flex-direction flex-wrap align-center'>
              <image class='huiyuan_fd1_0_c0_c0_c0' mode="aspectFit" :src='STATIC_URL+"485.png"'></image>
              <image class='huiyuan_fd1_0_c0_c0_c1' mode="aspectFit" :src='STATIC_URL+"486.png"'></image>
            </view>
            <view class='flex flex-direction flex-wrap align-stretch flex-sub huiyuan_fd1_0_c0_c1'>
              <text class='huiyuan_fd1_0_c0_c1_c0'>蔡菜菜</text>
              <text class='huiyuan_fd1_0_c0_c1_c1'>您暂未开通会员</text>
              <view class='flex flex-wrap align-center'>
                <text class='huiyuan_fd1_0_c0_c1_c1'>有效期：</text>
                <text class='huiyuan_fd1_0_c0_c1_c1'>2021-05-01</text>
              </view>
            </view>
          </view>
          <text class='huiyuan_fd1_0_c1'>开通会员享更多优惠</text>
        </view>
        <view class='flex flex-wrap align-center huiyuan_fd1_1'>
        </view>
      </view>

      <!---flex布局flex布局结束-->

      <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout">
        <text class='huiyuan_fd2_0'>会员时长</text>

        <scroll-view class='huiyuan_fd2_1' :scroll-x='true' :show-scrollbar='true'>
          <view class='flex align-center benben-scroll flex'>
            <benben-select-diy ref="showSelectPopup1698289159666" class-name='flex align-center flex'
              :items.sync="vipType" v-model="id" :label.sync="name" default-type="value" default-label="name"
              :allow-cancel='true' type="radio" :disabled='false'>
              <template v-for='(item,key0) in vipType'>
                <view v-if="item.isSelected" class='flex flex-direction flex-wrap align-center flex huiyuan_fd2_1_c0_c0'
                  :key="key0" @tap="$refs.showSelectPopup1698289159666.tapHandle(key0)">
                  <text class='huiyuan_fd2_1_c0_c0_c0'>月卡</text>
                  <view class='flex flex-wrap align-end huiyuan_fd2_1_c0_c0_c1'>
                    <text class='huiyuan_fd2_1_c0_c0_c1_c0'>RM</text>
                    <text class='huiyuan_fd2_1_c0_c0_c1_c0'>19.9</text>
                  </view>
                  <view class='flex flex-wrap align-center huiyuan_fd2_1_c0_c0_c2'>
                    <text>RM</text>
                    <text>24.9</text>
                  </view>
                </view>
                <view v-else class='flex flex-direction flex-wrap align-center flex huiyuan_fd2_1_c0_c1' :key="key0"
                  @tap="$refs.showSelectPopup1698289159666.tapHandle(key0)">
                  <text class='huiyuan_fd2_1_c0_c0_c0'>{{item.name}}</text>
                  <view class='flex flex-wrap align-end huiyuan_fd2_1_c0_c0_c1'>
                    <text class='huiyuan_fd2_1_c0_c0_c1_c0'>RM</text>
                    <text class='huiyuan_fd2_1_c0_c0_c1_c0'>{{item.sale_price}}</text>
                  </view>
                  <view class='flex flex-wrap align-center huiyuan_fd2_1_c0_c0_c2'>
                    <text>RM</text>
                    <text>{{item.show_price}}</text>
                  </view>
                </view>
              </template></benben-select-diy>
          </view>
        </scroll-view>

        <view class='flex flex-wrap align-center huiyuan_fd2_2'>
          <text class='huiyuan_fd2_2_c0'>会员权益</text>
        </view>
        <template v-for='(item,key0) in dataList'>
          <view class='flex flex-wrap align-center huiyuan_fd2_3' :key='key0'>
            <jyf-parser class='huiyuan_fd2_3_c0' :html="item.content | richTextFormat">
            </jyf-parser>
          </view>
        </template>

      </view>




    </view>
  </view>
</template>
<script>
  import {
    validate
  } from '@/common/utils/validate.js'
  export default {
    components: {},


    data() {
      return {
        "vipType": [],
        "dataList": []
      };
    },
    computed: {
      themeColor() {
        return this.$store.getters.themeColor
      },

    },
    watch: {},
    onLoad(options) {

    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {
      this.getVipTyleFunc()
      this.getVipRootFunc()
    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      //获取会员卡类型
      async getVipTyleFunc() {
        //请求方法
        //数据验证

        let datavipType = await this.$api.get(global.apiUrls.post64ae6310cf6f4, {

        });

        if (datavipType.data.code != 1) {
          this.$message.info(datavipType.data.msg);
          return
        }
        let infovipType = datavipType.data;
        this.vipType = infovipType.data

      },
      //获取会员权益
      async getVipRootFunc() {
        //请求方法
        //数据验证

        let datadataList = await this.$api.get(global.apiUrls.post636dc24bbf63d, {
          sort_type: 'desc'
        });

        if (datadataList.data.code != 1) {
          this.$message.info(datadataList.data.msg);
          return
        }
        let infodataList = datadataList.data;
        this.dataList = infodataList.data

      }
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: #F8F8F8;
    background-size: 100% auto;
  }

  .huiyuan_flex_0 {
    background: #fff;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .huiyuan_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 700;
    color: #333;
    line-height: 88rpx;
  }

  .huiyuan_fd0_0_c0_c0 {
    font-size: 36rpx;
    color: #333;
  }

  .huiyuan_fd0_0_c0 {
    width: 120rpx;
  }

  .huiyuan_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .huiyuan_fd1_1 {
    background: url(image-path('487.png')) no-repeat, transparent;
    background-size: 100% auto !important;
    margin: -85rpx 0rpx 0rpx 0rpx;
  }

  .huiyuan_fd1_0_c1 {
    line-height: 33rpx;
    font-size: 24rpx;
    font-weight: 400;
    color: #8E5535;
    margin: 53rpx 0rpx 16rpx 0rpx;
  }

  .huiyuan_fd1_0_c0_c1_c1 {
    line-height: 33rpx;
    font-size: 24rpx;
    font-weight: 500;
    color: #8E5535;
  }

  .huiyuan_fd1_0_c0_c1_c0 {
    line-height: 45rpx;
    font-size: 32rpx;
    font-weight: 400;
    color: #8E5535;
    margin: 0rpx 0rpx 13rpx 0rpx;
    -webkit-line-clamp: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
  }

  .huiyuan_fd1_0_c0_c1 {
    margin: 0rpx 0rpx 0rpx 24rpx;
  }

  .huiyuan_fd1_0_c0_c0_c1 {
    width: 99rpx;
    height: 26rpx;
    border-radius: 0rpx 0rpx 0rpx 0rpx;
    margin: -20rpx 0rpx 0rpx 0rpx;
  }

  .huiyuan_fd1_0_c0_c0_c0 {
    width: 88rpx;
    height: 88rpx;
    border-radius: 44rpx 44rpx 44rpx 44rpx;
  }

  .huiyuan_fd1_0 {
    background: url(image-path('484.png')) no-repeat, transparent;
    margin: 60rpx 24rpx 0rpx 24rpx;
    background-size: 100% auto !important;
    border-radius: 16rpx 16rpx 0rpx 0rpx;
    padding: 32rpx 32rpx 80rpx 32rpx;
  }

  ::v-deep .huiyuan_fd2_3_c0 {
    width: 686rpx;
  }

  .huiyuan_fd2_3 {
    margin: 0rpx 32rpx 0rpx 32rpx;
  }

  .huiyuan_fd2_2_c0 {
    color: #333333;
    font-size: 32rpx;
    font-weight: 400;
  }

  .huiyuan_fd2_2 {
    margin: 44rpx 32rpx 0rpx 32rpx;
  }

  .huiyuan_fd2_1_c0_c1 {
    border: 1px solid rgba(255, 255, 255, 1);
    background: var(--benbenbgColor1);
    border-radius: 16rpx 16rpx 16rpx 16rpx;
    padding: 40rpx 0rpx 44rpx 0rpx;
    width: 202rpx;
    margin: 0rpx 24rpx 0rpx 0rpx;
    background-size: 100% auto !important;
  }

  .huiyuan_fd2_1_c0_c0_c2 {
    margin: 0rpx 0rpx 8rpx 0rpx;
    font-size: 28rpx;
    font-weight: 500;
    color: rgba(191, 191, 191, 1);
    text-decoration: line-through;
  }

  .huiyuan_fd2_1_c0_c0_c1_c0 {
    font-size: 44rpx;
    font-weight: 500;
    color: var(--benbenFontColor0);
  }

  .huiyuan_fd2_1_c0_c0_c1 {
    margin: 0rpx 0rpx 7rpx 0rpx;
    line-height: 52rpx;
  }

  .huiyuan_fd2_1_c0_c0_c0 {
    margin: 0rpx 0rpx 28rpx 0rpx;
    font-size: 32rpx;
    font-weight: 500;
    color: #333;
    line-height: 45rpx;
  }

  .huiyuan_fd2_1_c0_c0 {
    border: 1px solid rgba(255, 204, 51, 1);
    background: rgba(249, 244, 228, 1);
    padding: 40rpx 0rpx 44rpx 0rpx;
    border-radius: 16rpx 16rpx 16rpx 16rpx;
    width: 202rpx;
    margin: 0rpx 24rpx 0rpx 0rpx;
  }

  .huiyuan_fd2_1 {
    touch-action: none;
    padding: 0rpx 0rpx 0rpx 32rpx;
    width: 750rpx;
  }

  .huiyuan_fd2_0 {
    padding: 32rpx 32rpx 32rpx 32rpx;
    border-radius: 16rpx 16rpx 0rpx 0rpx;
    font-size: 32rpx;
    font-weight: 700;
    color: #333;
  }
</style>